package com.qumitech.visualnovel.service.content;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.qumitech.visualnovel.model.dao.console.SpiderArticleWithBLOBs;
import com.qumitech.visualnovel.model.dao.console.SpiderComment;

import java.io.InputStream;
import java.util.List;

public interface ContentDeliveryService {

    List<SpiderArticleWithBLOBs> getList(Integer sourceType, String subType, Integer spiderId, Integer checked, Integer hasImage, Integer hasVideo, String startTime, String endTime,
                                         Integer offset, Integer limit, String orderType, String orderBy);

    Integer getCount(Integer sourceType,String subType, Integer spiderId, Integer checked, Integer hasImage, Integer hasVideo, String startTime, String endTime);

    List<SpiderArticleWithBLOBs> getRecommendList(Integer sourceType, Integer spiderId, Integer checked, Integer hasImage, Integer hasVideo, String startTime, String endTime,
                                                  Integer offset, Integer limit, String orderType, String orderBy);

    Integer getRecommendCount(Integer sourceType, Integer spiderId, Integer checked, Integer hasImage, Integer hasVideo, String startTime, String endTime);

    String uploadImage(InputStream file);

    JSONArray getTopicOptions();

    List<SpiderComment> getCommentList(Long articleId);

    JSONObject update(JSONObject param);

    JSONObject addToRecommend(Long articleId);

    JSONObject delete(List<Long> articleIdList, boolean isRecommend);

    JSONObject getRandomComment(Long articleId, Long publishTime);

    List<SpiderArticleWithBLOBs> pushRecommendTask();

    JSONObject getQuality(Integer sourceType, String startTime, String endTime, Integer offset, Integer limit);


}
